<?php

/**
 * Comment form.
 *
 * @package    myarticles
 * @subpackage form
 * @author     Apul Gupta<apulmca2k4@gmail.com>
 */
class CommentForm extends BaseCommentForm
{
  public function configure()
  {
      unset(  $this['total_votes'],
              $this['total_users'],
              $this['is_abused'],
              $this['created_at'],
              $this['updated_at']
              );
      
      $this->widgetSchema->setLabels(array('content'=>'Your Comment'));
      $this->widgetSchema['article_id'] = new sfWidgetFormInputHidden();
      $this->validatorSchema['web_url'] = new sfValidatorUrl(array('required'=>false));
      $this->validatorSchema['email_id']= new sfValidatorAnd(array($this->validatorSchema['email_id'], new sfValidatorEmail()));
      $this->validatorSchema['name']    = new sfValidatorString(array('min_length' => 2, 'max_length' => 40));
      $this->validatorSchema['content'] = new sfValidatorString(array('min_length'=> 10, 'max_length' => 1000));
  }
}
